package hackathon1212;

import java.util.Map;

import javax.persistence.EntityManager;

public class UserService extends ServletPojoAdapter{

	private static final long serialVersionUID = -4805544076051545500L;

	protected Boolean getBusinessMethod(Map<String, String[]> params){
		final String name = params.get("name")[0];
		final User user = new User(name);
		final EntityManager em = EMF.get().createEntityManager();
		try{
			em.persist(user);
		} finally {
			em.close();
		}
		return true;
	}

}
